﻿<phone:PhoneApplicationPage 
    x:Class="DevPhoneToolkitSample.Samples.CalendarControlTodaySample"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:DevPhone="clr-namespace:DevPhone.Controls;assembly=DevPhone.Controls.Toolkit"
    xmlns:Converts="clr-namespace:DevPhoneToolkitSample.Converts" FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <phone:PhoneApplicationPage.Resources>
        <Converts:ColorToBrushConverter x:Key="ColorToBrushConverter" />
    </phone:PhoneApplicationPage.Resources>
    <Grid x:Name="LayoutRoot" Background="Transparent" Margin="0,20">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <StackPanel>
            <Border Background="White" VerticalAlignment="Top" BorderBrush="Gray" BorderThickness="1">
                <Image Name="Logo" Source="/DevPhoneToolkitSample;component/Images/DevPhoneToolkit.png" Stretch="None" VerticalAlignment="Top" HorizontalAlignment="Left" />
            </Border>
        </StackPanel>
        <Grid x:Name="ContentPanel" Grid.Row="1">
            <ScrollViewer>
                <StackPanel>
                    <StackPanel Margin="12,0,12,0">
                        <TextBlock Text="Calendar - Today samples" FontSize="32"/>
                        <DevPhone:ExpanderControl Header="Tap here to choose Mark Options" FontSize="24" FontWeight="Normal" Margin="0,5" IsExpanded="False">
                            <StackPanel>
                                <DevPhone:DropDownControl Header="Today Mark" x:Name="CboTodayMark" Margin="0,10,0,10" SelectedIndex="1" SelectionChange="CboTodayMarkSelectionChange">
                                    <DevPhone:DropDownItem Content="None"/>
                                    <DevPhone:DropDownItem Content="Underline"/>
                                    <DevPhone:DropDownItem Content="Border"/>
                                    <DevPhone:DropDownItem Content="Background"/>
                                    <DevPhone:DropDownItem Content="MarkDate"/>
                                </DevPhone:DropDownControl>
                                <DevPhone:DropDownControl Header="Today Color" x:Name="CboToday" Margin="0,0,0,10" SelectionChange="CboTodaySelectionChange" SelectedIndex="0" Visibility="Collapsed">
                                    <DevPhone:DropDownControl.ItemTemplate>
                                        <DataTemplate>
                                            <StackPanel Orientation="Horizontal" Margin="5, 10, 10, 5">
                                                <Rectangle Fill="{Binding Color, Converter={StaticResource ColorToBrushConverter}}" Width="42" Height="42" />
                                                <TextBlock Margin="15, 0, 0, 0" Text="{Binding Text}" FontSize="24"  VerticalAlignment="Center"/>
                                            </StackPanel>
                                        </DataTemplate>
                                    </DevPhone:DropDownControl.ItemTemplate>
                                </DevPhone:DropDownControl>
                                <DevPhone:DropDownControl Header="mark position" x:Name="CboMarkPosition" Margin="0,10,0,10" SelectedIndex="0" SelectionChange="CboMarkPositionSelectionChange" Visibility="Collapsed">
                                    <DevPhone:DropDownItem Content="TopRight"/>
                                    <DevPhone:DropDownItem Content="TopLeft"/>
                                    <DevPhone:DropDownItem Content="BottomRight"/>
                                    <DevPhone:DropDownItem Content="BottomLeft"/>
                                </DevPhone:DropDownControl>
                                <DevPhone:DropDownControl Header="Day mark width" x:Name="CboMarkWidth" Margin="0,0,0,10" SelectedIndex="1" SelectionChange="CboMarkWidthSelectionChange" Visibility="Collapsed">
                                    <DevPhone:DropDownItem Content="Large"/>
                                    <DevPhone:DropDownItem Content="Medium"/>
                                    <DevPhone:DropDownItem Content="Small"/>
                                </DevPhone:DropDownControl>
                            </StackPanel>
                        </DevPhone:ExpanderControl>
                    </StackPanel>
                    <StackPanel Margin="0,0,0,0">
                        <TextBlock Text="Flick horizontal gesture." HorizontalAlignment="Center"  FontSize="18" Margin="12,0" />
                        <DevPhone:CalendarControl Margin="0,0,0,0" x:Name="Calend" ChangeSelectDate="CalendarControlChangeSelectDate" TodayHighlight="Underline" GestureDirection="Horizontal" />
                    </StackPanel>
                </StackPanel>
            </ScrollViewer>
        </Grid>
    </Grid>
</phone:PhoneApplicationPage>
